Fainting and experiencing
extreme pleasure activates similar pathways, as the body starts to ignore or shut down certain parts of the body to focus on pleasurable sensation. Your eye muscles lose
tension (since you don't need your eyes to orgasm), so your eye naturally rolls back.